﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace PostSharpModel.Cache
{
    public partial class CacheForm : Form
    {
        public CacheForm()
        {
            InitializeComponent();
        }

        private void btnOutPutInCache_Click(object sender, EventArgs e)
        {
            this.ltbResult.Items.Add("缓存输出：");
            string[] inputs = this.txtInput.Text.Split(',');

            foreach (string strInput in inputs)
            {
                this.ltbResult.Items.Add(CacheOperations.OutPutInCache(strInput));
            }
        }

        private void btnOutPutNoCache_Click(object sender, EventArgs e)
        {
            this.ltbResult.Items.Add("一般输出：");
            string[] inputs = this.txtInput.Text.Split(',');

            foreach (string strInput in inputs)
            {
                this.ltbResult.Items.Add(CacheOperations.OutPutNoCache(strInput));
            }
        }
    }
}
